package com.wawayaya.parentteacher.adapter;


import android.support.v4.app.Fragment;
import android.support.v4.app.FragmentManager;
import android.support.v4.app.FragmentPagerAdapter;

import com.wawayaya.base.BaseFragment;

import java.util.ArrayList;

/**
 * Created by wang_qian on 2015/12/7.
 */
public class SelectBookFragmentAdapter extends FragmentPagerAdapter {
    private ArrayList<BaseFragment> fragmentList;
    private ArrayList<String> titleList;

    public SelectBookFragmentAdapter(FragmentManager fm, ArrayList<BaseFragment> fragmentlist, ArrayList<String> titlelist) {
        super(fm);
        fragmentList = fragmentlist;
        titleList = titlelist;
    }

    @Override
    public Fragment getItem(int position) {
        return fragmentList.get(position);
    }

    @Override
    public int getCount() {
        return fragmentList.size();
    }

    @Override
    public CharSequence getPageTitle(int position) {
        return titleList.get(position);
    }


}
